-
Notifications
You must be signed in to change notification settings - Fork 115
Make default cpu and memory configurable #152
Conversation
cmd/frakti/frakti.go
Outdated
@@ -58,6 +58,8 @@ var ( | |||
enableAlternativeRuntime = pflag.Bool("enable-alternative-runtime", true, "Enable alternative runtime to handle OS containers, default is true") | |||
cgroupDriver = pflag.String("cgroup-driver", "cgroupfs", "Driver that the frakti uses to manipulate cgroups on the host. *SHOULD BE SAME AS* kubelet cgroup driver configuration. Possible values: 'cgroupfs', 'systemd'") | |||
rootDir = pflag.String("root-directory", "/var/lib/frakti", "Path to the frakti root directory") | |||
defaultCPUNum = pflag.Int("cpu", 1, "Default CPU number for HyperVM when cpu is not specified for the pod") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it worth to say cpu limit
and memory limit
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
cmd/frakti/frakti.go
Outdated
@@ -58,6 +58,8 @@ var ( | |||
enableAlternativeRuntime = pflag.Bool("enable-alternative-runtime", true, "Enable alternative runtime to handle OS containers, default is true") | |||
cgroupDriver = pflag.String("cgroup-driver", "cgroupfs", "Driver that the frakti uses to manipulate cgroups on the host. *SHOULD BE SAME AS* kubelet cgroup driver configuration. Possible values: 'cgroupfs', 'systemd'") | |||
rootDir = pflag.String("root-directory", "/var/lib/frakti", "Path to the frakti root directory") | |||
defaultCPUNum = pflag.Int("cpu-limit", 1, "Default CPU limit in number for HyperVM when cpu is not specified for the pod") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean: Default CPU in number for HyperVM when cpu limit is not specified for the pod
. Because there's also cpu request
in k8s, which frakti do not care.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
Signed-off-by: Pengfei Ni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In some cases, the default 64MB memory is not sufficient. This PR makes the default cpu and memory configurable.
It should help with rook.io (#151) with setting default memory to 512MB.